package com.motorhome.api.common.dao;

import com.motorhome.base.dao.impl.BaseDaoImpl2;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import javax.sql.DataSource;

/**
 * @author: John
 */
@Repository
public class DeviceBaseDaoImpl extends BaseDaoImpl2 {

    @Resource(name = "deviceDataSource")
    public void setDeviceDataSource(DataSource deviceDataSource) {
        this.jdbcTemplate = new JdbcTemplate(deviceDataSource);
        this.namedParameterJdbcTemplate = new NamedParameterJdbcTemplate(deviceDataSource);
    }

}
